﻿@model ResetPasswordEditModel
@{
    ViewData["Title"] = new string[] { "邮箱找回密码" };
    var codeError = TempData.Get<string>("codeError", string.Empty);
}


<div class="jh-login-home">
    <h1 class="tn-mb-30 tn-space-xlg-hor">找回帐号密码</h1>
    @using (Html.BeginForm("EmailResetPassword", "Account", FormMethod.Post, new { @id = "EmailResetPasswordForm", @class = "tn-space-xlg-hor form-horizontal tn-form-validation " }))
    {
        @Html.HiddenFor(n => n.AccountNumber)
        <div class="form-group">
            @Html.LabelFor(n => n.UserName)
            @Html.TextBoxFor(n => n.UserName, new { @class = "form-control", @placeholder = "手机号码或邮箱", @readonly = "readonly" })
            @Html.ValidationMessageFor(n => n.UserName)
        </div>
        <div class="form-group " id="passwordLoad">
            @Html.Action("_PassWordPoclaimed", "Account", new { name = "NewPassWord", passWordTitle = "新密码" })
            <span style="top:25px" class="glyphicon  form-control-feedback" aria-hidden="true"><i class="fa fa-eye-slash"></i></span>
            <input class="tn-click-eye" type="button" />
            @Html.ValidationMessageFor(n => n.NewPassWord)
            <span class="help-block tn-mb-0">字母、数字至少6位</span>
        </div>

        <div class="form-group">
            @Html.LabelFor(n => n.VerfyCode)
            <div class="row">
                <div class="col-xs-6">
                    @Html.TextBoxFor(n => n.VerfyCode, new { @class = "form-control" })
                    @Html.ValidationMessageFor(n => n.VerfyCode)
                    <span id="errorMsg" style="color:red">@codeError</span>
                </div>
                <div class="col-xs-6 form-control-static">
                    请输入邮箱收到的验证码
                </div>
            </div>
        </div>
        <div class="form-group">
            <button type="submit" class="btn btn-primary tn-btn-wm">确定</button>
        </div>
    }
</div>

<script>
    require(['jquery'],function(){
         $("#VerfyCode").blur(function myfunction() {
            if ($(this).val().length > 0) {
                $("#errorMsg").hide();
            } else {
                $("#errorMsg").show();
            }
        });
    })
</script>